﻿using System;
using System.Collections;

namespace hashtable练习
{
    class Program
    {
        static void Main(string[] args)
        {
            Hashtable h = new Hashtable();
            const string jian = "五星红旗迎风飘扬胜利歌声多么响亮我你它他她们哈几巴即把小猫狗羊鸡沙比傻逼死了妈爸爹老子干去回操草卧槽";
            const string fan = "五星紅旗迎風飄揚勝利歌聲多麼響亮我你它他她們哈幾巴即把小貓狗羊雞沙比傻逼死了媽爸爹老子乾去回操草臥槽";
            for (int i = 0; i < jian.Length; i++)
            {
                h.Add(jian[i], fan[i]);
            }

            Console.WriteLine("请输入要转换的简体字：");
            string input = Console.ReadLine();
            for (int i = 0; i < input.Length; i++)
            {
                if (h.ContainsKey(input[i]))
                {
                    Console.Write(h[input[i]]);
                }
                else
                {
                    Console.Write(input[i]);
                }
            }
            Console.ReadKey();
        }
    }
}
